package com.ibigcat.module.mdm.dao.mapper;

import java.util.*;

import com.ibigcat.framework.common.pojo.PageResult;
import com.ibigcat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.ibigcat.framework.mybatis.core.mapper.BaseMapperX;
import com.ibigcat.module.mdm.dao.entity.CodeRuleSequenceNumDO;
import org.apache.ibatis.annotations.Mapper;
import com.ibigcat.module.mdm.controller.admin.coderulesequencenum.vo.*;

/**
 * 编码规则序号 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface CodeRuleSequenceNumMapper extends BaseMapperX<CodeRuleSequenceNumDO> {

    default PageResult<CodeRuleSequenceNumDO> selectPage(CodeRuleSequenceNumPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CodeRuleSequenceNumDO>()
                .eqIfPresent(CodeRuleSequenceNumDO::getCodeSequence, reqVO.getCodeSequence())
                .eqIfPresent(CodeRuleSequenceNumDO::getNodeCode, reqVO.getNodeCode())
                .eqIfPresent(CodeRuleSequenceNumDO::getCodeNum, reqVO.getCodeNum())
                .betweenIfPresent(CodeRuleSequenceNumDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(CodeRuleSequenceNumDO::getId));
    }

}